import java.util.Scanner;
import java.lang.StringBuffer;

public class b186 {	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input;
		String[] spInput;
		int cookies, cakes, chocolate;
		int extraChocolate;
		StringBuffer output = new StringBuffer();
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			spInput = input.split(" ");
			
			cookies = Integer.parseInt(spInput[0]);
			chocolate = Integer.parseInt(spInput[1]);
			cakes = Integer.parseInt(spInput[2]);
			
			extraChocolate = Math.min(cookies / 10, cakes / 2);
			chocolate += extraChocolate;
			
			output.setLength(0);
			output.append(cookies + " 個餅乾，" + chocolate + " 盒巧克力，" + cakes + " 個蛋糕。");
			
			System.out.println(output.toString());
		}
	}
}